<?php

use \Phalcon\Config as PhConfig;

$env = 'default';
if (@$_SERVER['HTTP_HOST'] == 'localhost') 
{
    $env = 'localhost';
    define("APP_ID",'312371192297070');
    define("APP_SECRET",'70b8753c34fda307022991c6df15558a');
}
else if ((@$_SERVER['HTTP_HOST'] == 'http://behomebased-ph.eu1.frbit.net') || (@$_SERVER['HTTP_HOST'] == 'behomebased-ph.eu1.frbit.net'))
{
    $env = 'demo';
    define("APP_ID",'1532600823660179');
    define("APP_SECRET",'51119d594ee6332fd4dacc400fd1fff6');
}
else if ((@$_SERVER['HTTP_HOST'] == 'http://behomebased.remotestaff.org') || (@$_SERVER['HTTP_HOST'] == 'behomebased.remotestaff.org'))
{
    $env = 'test';
    define("APP_ID",'1604848196405250');
    define("APP_SECRET",'d5470aa8e5271c5c220713fb83c53994');
}
else if ((@$_SERVER['HTTP_HOST'] == 'www.behomebased.com.ph') || (@$_SERVER['HTTP_HOST'] == 'www.behomebased.ph'))
{
    $env = 'prod';
}
else if ((@$_SERVER['HTTP_HOST'] == 'devops.behomebased.com.ph') || (@$_SERVER['HTTP_HOST'] == 'devops.behomebased.ph'))
{
    $env = 'devops';
}

// add base uri environment here
$baseuri = array();
$baseuri['default']     = 'http://dev.behomebased.com.ph/';
$baseuri['localhost']   = 'http://localhost/behomebased/behomebased-ph/behomebased.ph/';
$baseuri['demo']   = 'http://behomebased-ph.eu1.frbit.net/';
$baseuri['test']   = 'http://behomebased.remotestaff.org/';
$baseuri['prod']   = 'http://www.behomebased.ph/';
$baseuri['devops']   = 'http://devops.behomebased.com.ph/';

$database['localhost']['adapter']   = 'Mysql';
$database['localhost']['host']      = 'localhost';
$database['localhost']['username']  = 'root';
$database['localhost']['password']  = '';
$database['localhost']['dbname']    = 'bh_db';

$database['default']['adapter']   = 'Mysql';
$database['default']['host']      = 'localhost';
$database['default']['username']  = 'root';
$database['default']['password']  = '';
$database['default']['dbname']    = 'bh_db';

$database['demo']['adapter']   = 'Mysql';
$database['demo']['host']      = 'behomebased-ph.mysql.eu1.frbit.com';
$database['demo']['username']  = 'behomebased-ph';
$database['demo']['password']  = '6mBstBM7wD5lGGj2';
$database['demo']['dbname']    = 'behomebased-ph';


$database['test']['adapter']   = 'Mysql';
$database['test']['host']      = 'http://behomebased.remotestaff.org/';
$database['test']['username']  = 'brett';
$database['test']['password']  = '7423346';
$database['test']['dbname']    = 'bh_db';

return new \Phalcon\Config(array(
    'database' => $database[$env],
    'application' => array(
        'controllersDir' => __DIR__ . '/../../app/controllers/',
        'modelsDir'      => __DIR__ . '/../../app/models/',
        'viewsDir'       => __DIR__ . '/../../app/views/',
        'pluginsDir'     => __DIR__ . '/../../app/plugins/',
        'libraryDir'     => __DIR__ . '/../../app/library/',
        'cacheDir'       => __DIR__ . '/../../app/cache/',
        'baseUri'        => $baseuri[$env],
    )
));
